package com.feihong.activity.controller;

import com.feihong.activity.entity.JsonResult;
import com.feihong.activity.service.BackFeedingService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.IOException;

/**
 * 市级往区级反哺数据的Controller层
 * @author Filter
 */
@RestController
@RequestMapping("feeding")
public class BackFeedingController {

    @Resource
    private BackFeedingService backFeedingService;


    @PostMapping("equipment")
    @Transactional(rollbackFor = Exception.class)
    public JsonResult shareEquipmentByCity(String pathName, String batchName) throws IOException, IllegalAccessException {
        backFeedingService.shareEquipmentByCity(pathName,batchName);
        return new JsonResult();
    }
}
